/*
https://codeforces.ml/contest/1367/problem/0
A. Short Substrings
*/ 
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <iostream>
using namespace std;
const int maxn = 110;

char b[maxn];
int main()
{
	int t;
	scanf("%d",&t);
	while(t--)
	{
		scanf(" %s",b+1);
		int len = strlen(b+1);
		int cnt = 1;
		printf("%c",b[1]);
		for(int i=2;i<len;i+=2)
		{
			printf("%c",b[i]);
		}	
		if(len>=2) printf("%c\n",b[len]);

	}
}
